<?php
/* 
* @Title:  [商品评价控制器]
* @Author: {chenlei} [chenleib5@126.com]
* @Date:   2014-04-27 15:16:37
* @Last Modified by:   Administrator
* @Last Modified time: 2014-04-27 20:18:50
* @Copyright:  [hn7m.com]
*/
class CommentModel extends Model{
	public $table='comment';
	/**
	 * [add_data 添加评价]
	 * @param [type] $data [description]
	 */
	public function add_data($data){
		return $this->add($data);
	}
	/**
	 * [get_num 计数]
	 * @param  [type] $where [description]
	 * @param  [type] $field [description]
	 * @return [type]        [description]
	 */
	public function get_num($where){
		return $this->where($where)->count();
	}
	/**
	 * [get_data 获得所有的数据]
	 * @param  [type] $where [description]
	 * @param  [type] $order [description]
	 * @return [type]        [description]
	 */
	public function get_data($where=NULL,$order=NULL){
		return $this->where($where)->order($order)->findAll();
	}
	/**
	 * [del_data 删除数据]
	 * @param  [type] $where [description]
	 * @return [type]        [description]
	 */
	public function del_data($where){
		return $this->where($where)->del();
	}
}
?>